import request from "@/utils/request";
/**
 * 维护维修列表
 * @param {*} data
 * @returns
 */
export function API_repairList(params) {
  return request({
    url: "/repair/list",
    method: "get",
    params,
  });
}

/**
 * 维护维修新增
 * @returns
 */
export function API_repairCreate(data) {
  return request({
    url: "/repair/create",
    method: "post",
    data,
  });
}

/**
 * 维护维修修改
 * @returns
 */
export function API_repairEdit(data) {
  return request({
    url: `/repair/edit/${data.code}`,
    method: "put",
    data,
  });
}

/**
 * 维护维修删除
 * @returns
 */
export function API_repairDelete(data) {
  return request({
    url: `/repair/delete/${data.code}`,
    method: "delete",
  });
}

/**
 * 维护维修记录
 * @returns
 */
export function API_repairGet(params) {
  return request({
    url: "/repair/get",
    method: "get",
    params,
  });
}
